<div class="layui-form" lay-filter="layuiadmin-form-useradmin" style="padding: 20px 0 0 0;">
  <div class="layui-form-item">
    <label class="layui-form-label">订单号</label>
    <div class="layui-input-inline" style="width: 300px;">
      <script type="text/html" template>
        <input type="text" name="serialNum" value="{{ d.params.serialNum || '' }}" disabled placeholder=""  autocomplete="off" class="layui-input">
      </script>
    </div>
    <!-- <label class="layui-form-label">用户名</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="account" value="{{ d.params.account || '' }}" disabled  lay-verify="account" placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div> -->
  </div>
  <div class="layui-form-item">
    
  </div>
  <div class="layui-form-item" hidden>
    <div class="layui-input-inline" >
      <script type="text/html" template>
        <input type="text" name="mainPicture" value="{{ d.params.mainPicture || '' }}" placeholder="" autocomplete="off" class="mainPiccls layui-input" >
      </script>
    </div>
  </div>
  <div class="layui-form-item" hidden>
    <div class="layui-input-inline" >
      <script type="text/html" template>
        <input type="text" name="orderId" value="{{ d.params.orderId || '' }}"  placeholder="" autocomplete="off" class="mainPiccls layui-input" >
      </script>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">主图</label>
    <div class="layui-upload-list">
      <img class="layui-upload-img" style="display: inline-block; width: 100px; height: 100px;">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">消费类型</label>
    <div class="layui-input-inline">
      <select name="gtype" id="gtype" lay-filter="myselect" lay-verify="gtype" >
        <option value="">请选择</option>
        <option value="2">升级套餐</option>
        <option value="1">普通商品</option>
      </select>
  </div>
    <!-- <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="gtype" value="{{ d.params.gtype || '' }}" disabled  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div> -->
    <label class="layui-form-label">商品名称</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="goodsName" value="{{ d.params.goodsName || '' }}" disabled  placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
    <label class="layui-form-label">优惠价</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="disPrice" value="{{ d.params.disPrice || '' }}" disabled   placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">原价</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="price" value="{{ d.params.price || '' }}" disabled  placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
    
    <label class="layui-form-label">奖励积分</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="rewardPs" value="{{ d.params.rewardPs || '' }}" disabled  placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>

  <div class="layui-form-item">
    
    <label class="layui-form-label">数量</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="numb" value="{{ d.params.numb || '' }}" disabled   placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>

    <label class="layui-form-label">总价</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="totalPrice" value="{{ d.params.totalPrice || '' }}" disabled  placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>

    <label class="layui-form-label">订单状态</label>
    <div class="layui-input-inline">
      <select name="status" id="status" lay-filter="myselect"  >
        <option value="">请选择</option>
        <option value="0">未支付</option>
        <option value="1">已支付</option>
        <option value="2">待收货</option>
        <option value="3">已确认收货</option>
     </select>
    </div>
  </div>
  <!-- <div class="layui-form-item" hidden>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="status" value="{{ d.params.status || '' }}" disabled  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div> -->


  <div class="layui-form-item">
    <label class="layui-form-label">创建时间</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="createDate" value="{{ d.params.createDate || '' }}" disabled   placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
    <label class="layui-form-label">备注</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="remark" value="{{ d.params.remark || '' }}" disabled   placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  

  <div class="layui-form-item">
    
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">物流单号</label>
    <div class="layui-input-inline" style="width: 300px;">
      <script type="text/html" template>
        <input type="text" name="logisticsNum" value="{{ d.params.logisticsNum || '' }}" disabled   placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
    <label class="layui-form-label">物流公司</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="logisticsCompany" value="{{ d.params.logisticsCompany || '' }}" disabled   placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
    <label class="layui-form-label">省市</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="cityProv" value="{{ d.params.cityProv || '' }}"  placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">收货地址</label>
    <div class="layui-input-inline" style="width: 300px;">
      <script type="text/html" template>
        <input type="text" name="address" value="{{ d.params.address || '' }}"  placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
    <label class="layui-form-label">收货人姓名</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="consignee" value="{{ d.params.consignee || '' }}"  placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
    <label class="layui-form-label">收货手机</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="consigneeMobile" value="{{ d.params.consigneeMobile || '' }}"  placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label"></label>
    <div class="layui-input-inline">
      <input type="button" lay-submit lay-filter="LAY-user-front-submit" value="确认修改" class="layui-btn">
    </div>
  </div>
  
</div>

<script type="text/javascript">
  function createTime(v){
    var date = new Date(v);
      var y = date.getFullYear();
      var m = date.getMonth()+1;
      m = m<10?'0'+m:m;
      var d = date.getDate();
      d = d<10?("0"+d):d;
      var h = date.getHours();
      h = h<10?("0"+h):h;
      var M = date.getMinutes();
      M = M<10?("0"+M):M;
      var str = y+"-"+m+"-"+d+" "+h+":"+M;
      return str;
  }
</script>

<script>
layui.use(['jquery'],function(){
  var $ = layui.jquery
  ,setter = layui.setter;
  
  var url1 = setter.myurl + 'config';
  
})

function getContent() {
  $(".contentval").val(UE.getEditor('editor').getContent());
  alert("已保存草稿。")
}


layui.use(['admin', 'form', 'upload'], function(){
  var $ = layui.$
  ,form = layui.form
  ,setter = layui.setter
  ,upload = layui.upload;
  window.UEDITOR_CONFIG = {
    // 服务器统一请求接口路径
    serverUrl: setter.myurl + "config"
  };

  $(".layui-upload-img").attr("src",$(".mainPiccls").val());
  
  //上传头像
  upload.render({
    elem: '#layuiadmin-upload-useradmin'
    ,url: setter.myurl + 'admin/uploadMainPicture'
    ,accept: 'images'
    ,method: 'post'
    ,acceptMime: 'image/*'
    ,done: function(res){
      console.log(res)
      $(".mainPiccls").val(res.data);
      $(this.item).prev("div").children("input").val(res.data)
    }
  });

  //上传头像
  upload.render({
    elem: '#layuiadmin-upload-useradmin1'
    ,url: setter.myurl + 'admin/uploadMainPicture'
    ,accept: 'images'
    ,method: 'post'
    ,acceptMime: 'image/*'
    ,done: function(res){
      console.log(res)
      $(".mainPiccls1").val(res.data);
      $(this.item).prev("div").children("input").val(res.data)
    }
  });

  //上传头像
  upload.render({
    elem: '#layuiadmin-upload-useradmin2'
    ,url: setter.myurl + 'admin/uploadMainPicture'
    ,accept: 'images'
    ,method: 'post'
    ,acceptMime: 'image/*'
    ,done: function(res){
      console.log(res)
      $(".mainPiccls2").val(res.data);
      $(this.item).prev("div").children("input").val(res.data)
    }
  });
})


</script>